﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第125题
//BC127 小乐乐算最高分
//https://www.nowcoder.com/practice/57c71982296b45b281838c2a40283c19?tpId=107&tqId=33408&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D3%26tpId%3D107%26type%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

//跟BC123思路一致，循环的判断改成n
int main() {
    int max = 0;
    int temp = 0;
    int n = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &temp);
        if (temp > max)
            max = temp;
    }

    printf("%d", max);

    return 0;
}